package com.hspedu.innerclass_;

public class AnonymousInnerClass {
    public static void main(String[] args) {
        Father f = new Father("jack"){
            @Override
            public void test() {
                System.out.println("test has been overriding");
            }
        };
        f.test();
        f.test();
        System.out.println(f.getClass());
    }
}

class Father{
    String name;

    public Father(String name) {
        this.name = name;
    }

    public void test(){
        System.out.println("father is testing");
    }
}


